<?php

class AdminModule extends CWebModule
{
	public $defaultController = 'dashboard';
	public function init()
	{
		// this method is called when the module is being created
		// you may place code here to customize the module or the application

		// import the module-level models and components
		$this->setImport(array(
			'admin.models.*',
			'admin.components.*',
			'admin.widgets.*',
		));

		Yii::app()->setComponents(array(
			'errorHandler'=>array(
				'errorAction'=>'admin/dashboard/error',
			),
			'user'=>array(
					// enable cookie-based authentication
					'allowAutoLogin'=>true,
					'loginUrl'=>array('/admin/dashboard/login'),
			),
		));
		Yii::app()->theme = 'admin';
	}

}
